#include "Hasher.h"
#include "lookup3.c"
#include <iostream>

using namespace std;

unsigned long long Hasher::abcHash(std::string word) {
//		cout << "p: " << word << endl;
		uint32_t pc = 0;
		uint32_t pb = 29;
		hashlittle2(word.c_str(), word.size(), &pc, &pb);
		unsigned long long hash = pc + (((uint64_t)pb)<<32);
//		unsigned long long hash = 0;
//		unsigned long long MAX_VALUE = numeric_limits<unsigned long long>::max();
//		for (uint i = 0; i<word.size(); i++)
//			hash = (hash + (unsigned long long)(( word[i] - 'a' + 1)*pow(37,i)) )%MAX_VALUE;
//		cout << "Hash: " << hash << endl;
//		cout << "pc: " << pc << " pb: " << pb << endl;
		return hash;
//	  driver1();   /* test that the key is hashed: used for timings */
//	  driver2();   /* test that whole key is hashed thoroughly */
//	  driver3();   /* test that nothing but the key is hashed */
//	  driver4();   /* test hashing multiple buffers (all buffers are null) */
//	  return 1;
	}
